local function loadPackages(packages)
    for _, packageName in ipairs(packages or {}) do 
        package.loaded[packageName] = nil;
        xpcall(function ()
            require(packageName);
        end, function()
            print("load package failed." .. (packageName or ""));
            print(debug.traceback());
        end)
    end
end

local packages = {
    GamePath .. ".gameversion", 
    GamePath .. ".config.ddzstring_zh", 
    GamePath .. ".config.ddzgameconfig", 
    GamePath .. ".config.ddzsocketconfig", 
    GamePath .. ".config.ddzeventconfig", 
    GamePath .. ".config.ddzsoundconfig", 
    GamePath .. ".config.ddzgamedata", 
    GamePath .. ".proto.ddzCommon_pb", 
    GamePath .. ".proto.base_game_interaction_pb", 
    GamePath .. ".proto.ddz_pb", 
    GamePath .. ".aglorithm.init", 
};

loadPackages(packages);